public class WB_OpenApi {
	
	public final static string url_oauth2_authorize = 'https://api.weibo.com/oauth2/authorize';
	public final static string url_oauth2_access_token = 'https://api.weibo.com/oauth2/access_token';
	public final static string url_friendships_followers = 'https://api.weibo.com/2/friendships/followers.json';
	public final static string url_search_suggestions_users = 'https://api.weibo.com/2/search/suggestions/users.json';
	public final static string url_users_show = 'https://api.weibo.com/2/users/show.json';
	public final static string url_statuses_user_timeline = 'https://api.weibo.com/2/statuses/user_timeline.json';
	public final static string url_search_suggestions_statuses = 'https://api.weibo.com/2/search/suggestions/statuses.json';
	
	public final static string url_redirect_uri = 'https%3A%2F%2Fna14.salesforce.com%2Fapex%2Fweibo_callback';
	
	
	
	public final static String url_show_weibo_byId  = 'https://api.weibo.com/2/statuses/show.json';
	public final static String url_query_mid_byId = 'https://api.weibo.com/2/statuses/querymid.json';
	public final static String url_show_comments_byId = 'https://api.weibo.com/2/comments/show.json';
	public final static String url_reply_for_comment  = 'https://api.weibo.com/2/comments/reply.json';
	public final static String url_pose_new_comment  = 'https://api.weibo.com/2/comments/create.json';
	
	
	//---------- oauth2/authorize ------------
	public class WB_oauth2_authorize_in {
		//client_id	true	string	申请应用时分配的AppKey。
		public string  client_id {get;set;}
		//redirect_uri	true	string	授权回调地址，站外应用需与设置的回调地址一致，站内应用需填写canvas page的地址。
		public string  redirect_uri {get {return url_redirect_uri;} set;}
		//response_type	false	string	返回类型，支持code、token，默认值为code。
		public string  response_type {get;set;}
		//state	false	string	用于保持请求和回调的状态，在回调时，会在Query Parameter中回传该参数。
		public string  state {get;set;}
		//display	false	string	授权页面的终端类型，取值见下面的说明。
		public string  cliedisplaynt_id {get;set;}
		//language	false	string	授权页语言，缺省为中文简体版，en为英文版。英文版测试中，开发者任何意见可反馈至 @微博API
		public string  language {get;set;}
		
		public WB_oauth2_authorize_in(){
			client_id =  WBUtil.AppKey;
			response_type = 'code';
		}
		
		public string toRequestUrl(){
	    string url = url_oauth2_authorize + 
		     '?client_id=' + client_id +
	       '&response_type=' + response_type +
	       '&redirect_uri=' + redirect_uri;
    	return url;
		}
	}
	
	//---------- oauth2/access_token ------------
	public class WB_oauth2_access_token_in {
	
		//client_id	true	string	申请应用时分配的AppKey。
		public string  client_id {get;set;}
		//client_secret	true	string	申请应用时分配的AppSecret。
		public string  client_secret {get;set;}
		//grant_type	true	string	请求的类型，可以为authorization_code、password、refresh_token。
		public string  grant_type {get;set;}
		//--grant_type为authorization_code时
		//code	true	string	调用authorize获得的code值。
		public string  code {get;set;}
		//redirect_uri	true	string	回调地址，需需与注册应用里的回调地址一致。
		public string  redirect_uri {get {return url_redirect_uri;} set;}
		//--grant_type为password时
		//username	true	string	授权用户的用户名。
		public string  username {get;set;}
		//password	true	string	授权用户的密码。
		public string  password {get;set;}
		
		public WB_oauth2_access_token_in(){
			client_id =  WBUtil.AppKey;
			client_secret = WBUtil.ClientSecret;
			grant_type = 'authorization_code';
			code = WBUtil.Code;
		}
		
		public string toRequestUrl(){
	    string url = url_oauth2_access_token + 
		     '?client_id=' + client_id +
	       '&client_secret=' + client_secret +
	       '&grant_type=' + grant_type +
	       '&code=' + code +
	       '&redirect_uri=' + redirect_uri;
    	return url;
		}
	}
		
	public class WB_oauth2_access_token_out {

		//返回值字段	字段类型	字段说明
		//access_token	string	用于调用access_token，接口获取授权后的access token。
   	 	public string  access_token {get;set;}
		//expires_in	string	access_token的生命周期。
    	public decimal  expires_in {get;set;}
		//remind_in	string	access_token的生命周期（该参数即将废弃，开发者请使用expires_in）。
    	public string  remind_in {get;set;}
		//uid	string	当前授权用户的UID。
    	public string  uid {get;set;}
    
	    public WB_oauth2_access_token_out parse(string content) {
	        WB_oauth2_access_token_out c = (WB_oauth2_access_token_out)JSON.deserialize(
	        content, WB_oauth2_access_token_out.class);
	        this.access_token = c.access_token;
	        this.expires_in = c.expires_in;
	        this.remind_in = c.remind_in;
	        this.uid = c.uid;
	        return c;
	    }
	}
	
	
	// ---------- /2/statuses/querymid.json ------------
	public class WB_Statuses_QueryMid_ById_In{
		
		public String token {get;set;}
		public String id {get;set;}
		public String types {get;set;}
		
		public WB_Statuses_QueryMid_ById_In(){
			token = WBUtil.Token;
			types = '1';
		}

	    public String toRequestURL(){
	        
	        String url = url_query_mid_byId + '?access_token='+token+'&id='+id+'&type='+ types;
	        system.debug('Request URL : '+ url);
	        string jsonResult = WBUtil.sendRequest( url, 'GET' );
	        return jsonResult;
	    }
	
	}
	
	public class WB_Statuses_QueryMid_ById_Out{
		
		public String mid {get;set;}
		
		public WB_Statuses_QueryMid_ById_Out parse(string content) {
	        WB_Statuses_QueryMid_ById_Out out = ( WB_Statuses_QueryMid_ById_Out )JSON.deserialize(
	        			content, WB_Statuses_QueryMid_ById_Out.class);
	        return out;
	    }
	}
	
	//---------- /2/comments/create.json ------------
	/**
	 * return json;
	 */
	public class WB_Comment_Create_In{
	
	
		public String token {get;set;}
		public String id {get;set;}
		public String comment {get;set;}
		
		public WB_Comment_Create_in(){
		
			token = WBUtil.Token;
		}

	    public String toRequestURL(){
	        
	       // String id = '3487302598860826';
	       // token = '2.00wd1CkCZqULeE91070bf395rtcnTB';
	       // String comment = 'TestContent';
	        
	        String url = url_pose_new_comment;  //'https://api.weibo.com/2/comments/create.json';
	        String param = 'access_token='+token+'&id='+id+'&comment='+ EncodingUtil.urlEncode( comment , 'UTF-8' );
	        string jsonResult = WBUtil.sendRequest( url, 'POST', param );
	        return jsonResult;
	    }
    
	}
	
	public class WB_Comment_Create_Out{
	
		public String created_at{get;set;}	// 评论创建时间
		public String id {get;set;}		// 评论的ID
		public String text {get;set;}	// 评论的内容
		public String source {get;set;}	// 评论的来源
		public String mid {get;set;}	// 评论的MID
		
		public WB_Comment_Create_Out(){
		}
		
		public WB_Comment_Create_Out parse( String strJson ){
			WB_Comment_Create_Out outObj = (WB_Comment_Create_Out)JSON.deserialize( strJson , WB_Comment_Create_Out.class );
			this.id = outObj.id;
			this.mid = outObj.mid;
			this.created_at = outObj.created_at;
			this.text =  outObj.text;
			this.source = outObj.source;
			return outObj;		
		}
	}
	
	
	// ---------- /2/statuses/show.json ------------
	// get weibo info by weibo ID
	public class WB_WeiboInfo_Show_In{
		public string source {get;set;}	//false	string	采用OAuth授权方式不需要此参数，其他授权方式为必填参数，数值为应用的AppKey。
		public string access_token {get;set;}	// false	string	采用OAuth授权方式为必填参数，其他授权方式不需要此参数，OAuth授权后获得。
		public string id {get;set;}	//true	int64	需要获取的微博ID。
		
		public WB_WeiboInfo_Show_In(){
			access_token = WBUtil.token;
		}
		
		public string toRequestUrl(){
		    string url = url_show_weibo_byId + '?access_token=' + access_token +'&id=' +id;
		    string jsonResult = WBUtil.sendRequest( url, 'GET' );
	    	return jsonResult;
		}
			
	}
	
	// return WB_users_show_out_status Class Bean
	public class WB_WeiboInfo_Show_Out {
		
		WB_users_show_out_status outObj {get;set;}
		
		 public WB_users_show_out_status parse(string content) {
	        outObj = (WB_users_show_out_status)JSON.deserialize(
	        	content, WB_users_show_out_status.class);
	        return outObj;
	    }
		
	}
	
	//---------- /2/comments/show.json ------------
	public class WB_Show_Comments_ById_In{
	
		public string source {get;set;}
		public String access_token {get;set;} 	 //= '2.00wd1CkCZqULeE91070bf395rtcnTB';
        public String id {get;set;} //= '3487302598860826';
        
		public WB_Show_Comments_ById_In(){
			access_token = WBUtil.token;
		}
		
		public string toRequestUrl(){
		    string url = url_show_comments_byId + '?access_token=' + access_token +'&id=' +id;
	    	return url;
		}
		
	}
	
	public class WB_Show_Comments_ById_Out{
	
		public string created_at {get;set;}
		public string id {get;set;}
		public string text {get;set;}
		public string source {get;set;}
		public string mid {get;set;}
		public string idstr {get;set;}
		public WB_users_show_out user {get;set;}
		
		public WB_Show_Comments_ById_Out(){
		}
		public WB_Show_Comments_ById_Out parse(string content) {
	        WB_Show_Comments_ById_Out out = (WB_Show_Comments_ById_Out)JSON.deserialize( content, WB_Show_Comments_ById_Out.class);
	        //user = new List<WB_users_show_out>();
	        this.created_at = out.created_at;
	        this.id = out.id;
	        this.source = out.source;
	        this.mid = out.mid;
	        this.idstr = out.idstr;
	        this.user = out.user;
	        return out;
	    }
	}
	
	public class WB_Show_Comments_ById_Out_Array {
		
		public List<WB_Show_Comments_ById_Out> comments{get;set;}
		
		public WB_Show_Comments_ById_Out_Array(){
		
		}
	    public WB_Show_Comments_ById_Out_Array parse(string content) {
	    	comments = new List<WB_Show_Comments_ById_Out>();
	    	string json_string = content;
		    WB_Show_Comments_ById_Out_Array arr = (WB_Show_Comments_ById_Out_Array)JSON.deserialize(
		    	json_string, WB_Show_Comments_ById_Out_Array.class);
	    	return arr;
	    }
	}
	
	
	//---------- 2/comments/reply.json ------------
	public class WB_Comments_Reply_In{
	
	
		//source	false	string	采用OAuth授权方式不需要此参数，其他授权方式为必填参数，数值为应用的AppKey。
		public string  source {get;set;}
		//access_token	false	string	采用OAuth授权方式为必填参数，其他授权方式不需要此参数，OAuth授权后获得。
		public string  access_token {get;set;}
		//uid	false	int64	需要查询的用户ID。
		public string  uid {get;set;}
		
        public String id {get;set;} //= '3487302598860826';
        public String cid {get;set;} //= '3487361206168524';
        public String comment {get;set;} //= Math.random()+'';
        
		public WB_Comments_Reply_In(){
			access_token = WBUtil.token;
		}
		
		public string toRequestUrl(){
			
			String URL = getURL();
       	 	String param = getParam();
        	string jsonResult = WBUtil.sendRequest( URL , 'POST' , param );
        	
			return jsonResult;
		}
		
		public string getURL(){
			return url_reply_for_comment;
		}
		
		public string getParam(){
			return '?id='+id+'&cid='+cid+'&comment='+EncodingUtil.urlEncode(comment,'UTF-8')+'&access_token='+access_token;
		}
		
	}
	
	
	
	
	
	//---------- search/suggestions/users.json ------------
	public class WB_search_suggestions_users_in {
		//source	false	string	采用OAuth授权方式不需要此参数，其他授权方式为必填参数，数值为应用的AppKey。
		public string  source {get;set;}
		//access_token	false	string	采用OAuth授权方式为必填参数，其他授权方式不需要此参数，OAuth授权后获得。
		public string  access_token {get;set;}
		//q	true	string	搜索的关键字，必须做URLencoding。
		public string  q {get;set;}
		//count	false	int	返回的记录条数，默认为10。
		public decimal  count {get;set;}
		
		public WB_search_suggestions_users_in(){
			access_token = WBUtil.token;
			count=10;
		}
		
		public string toRequestUrl(){
	    string url = url_search_suggestions_users + 
		     '?access_token=' + access_token +
	       '&q=' + EncodingUtil.urlEncode(q,'UTF-8') +
	       '&count=' + count;
    	return url;
		}
	}
		
	public class WB_search_suggestions_users_out {

		//返回值字段	字段类型	字段说明
		//access_token
    	public string  screen_name {get;set;}
		//followers_count
  	  	public decimal  followers_count {get;set;}
		//uid	string	当前授权用户的UID。
    	public string  uid {get;set;}
    
	    public WB_search_suggestions_users_out parse(string content) {
	        WB_search_suggestions_users_out c = (WB_search_suggestions_users_out)JSON.deserialize(
	        	content, WB_search_suggestions_users_out.class);
	        this.screen_name = c.screen_name;
	        this.followers_count = c.followers_count;
	        this.uid = c.uid;
	        return c;
	    }
	}
	
	public class WB_search_suggestions_users_out_array {
		public List<WB_search_suggestions_users_out> lst_data{get;set;}
	    public WB_search_suggestions_users_out_array parse(string content) {
	    	lst_data = new List<WB_search_suggestions_users_out>();
	    	string json_string ='{"lst_data":' + content + '}';
		    WB_search_suggestions_users_out_array arr = (WB_search_suggestions_users_out_array)JSON.deserialize(
		    	json_string, WB_search_suggestions_users_out_array.class);
	    	return arr;
	    }
	}

	//---------- search/suggestions/statuses.json ------------
	public class WB_search_suggestions_statuses_in {
		//source	false	string	采用OAuth授权方式不需要此参数，其他授权方式为必填参数，数值为应用的AppKey。
		public string  source {get;set;}
		//access_token	false	string	采用OAuth授权方式为必填参数，其他授权方式不需要此参数，OAuth授权后获得。
		public string  access_token {get;set;}
		//q	true	string	搜索的关键字，必须做URLencoding。
		public string  q {get;set;}
		//count	false	int	返回的记录条数，默认为10。
		public decimal  count {get;set;}
		
		public WB_search_suggestions_statuses_in(){
			access_token = WBUtil.token;
			count=10;
		}
		
		public string toRequestUrl(){
	    string url = url_search_suggestions_statuses + 
		     '?access_token=' + access_token +
	       '&q=' + EncodingUtil.urlEncode(q,'UTF-8') +
	       '&count=' + count;
    	return url;
		}
	}
		
	public class WB_search_suggestions_statuses_out {

		//"suggestion": "最关注",
	    public string  suggestion {get;set;}
		//"count": 72702
	    public decimal  count {get;set;}
	    
	    public WB_search_suggestions_statuses_out parse(string content) {
	        WB_search_suggestions_statuses_out c = (WB_search_suggestions_statuses_out)JSON.deserialize(
	        	content, WB_search_suggestions_statuses_out.class);
	        this.suggestion = c.suggestion;
	        this.count = c.count;
	        return c;
	    }
	}
	
	public class WB_search_suggestions_statuses_out_array {
		public List<WB_search_suggestions_statuses_out> lst_data{get;set;}
	    public WB_search_suggestions_statuses_out_array parse(string content) {
	    	lst_data = new List<WB_search_suggestions_statuses_out>();
	    	string json_string ='{"lst_data":' + content + '}';
		    WB_search_suggestions_statuses_out_array arr = (WB_search_suggestions_statuses_out_array)JSON.deserialize(
		    	json_string, WB_search_suggestions_statuses_out_array.class);
	    	return arr;
	    }
	}
	
	//---------- /users/show.json ------------

	public class WB_users_show_in {
		//source	false	string	采用OAuth授权方式不需要此参数，其他授权方式为必填参数，数值为应用的AppKey。
		public string  source {get;set;}
		//access_token	false	string	采用OAuth授权方式为必填参数，其他授权方式不需要此参数，OAuth授权后获得。
		public string  access_token {get;set;}
		//uid	false	int64	需要查询的用户ID。
		public string  uid {get;set;}
		//screen_name	false	string	需要查询的用户昵称。
		public string  screen_name {get;set;}
		
		public WB_users_show_in(){
			access_token = WBUtil.token;
		}
		
		public string toRequestUrl(){
	    string url = url_users_show + 
		     '?access_token=' + access_token;
			if(!WBUtil.isNvl(uid)){
				url +='&uid=' + uid;
			}
			else{
				screen_name +='&screen_name=' + screen_name;
			}
	       
    	return url;
		}
	}
		
	public class WB_users_show_out_status {
		//"created_at":"Wed Aug 29 13:31:03 +0800 2012"
    public string  created_at {get;set;}
		//"id":3484354296647109
    public string  id {get;set;}
		//"mid":"3484354296647109"
    public string  mid {get;set;}
		//"idstr":"3484354296647109"
    public string  idstr {get;set;}
		//"text":"“小明冷笑话”从前，有一天，小明爸爸看他写作文。有个很简单的字写错了，爸爸笑着跟妈妈说：“我发现你的儿子很笨。”小明急了，大声跟爸爸说：“你的儿子才笨！” [黑线][衰]"
    public string  text {get;set;}
		//"source":"<a href=\"http://weibo.com/\" rel=\"nofollow\">新浪微博</a>"
    public string  source {get;set;}
		//"favorited":false
    public string  favorited {get;set;}
		//"truncated":false
    public string  truncated {get;set;}
		//"in_reply_to_status_id":""
    public string  in_reply_to_status_id {get;set;}
		//"in_reply_to_user_id":""
    public string  in_reply_to_user_id {get;set;}
		//"in_reply_to_screen_name":""
    public string  in_reply_to_screen_name {get;set;}
		//"thumbnail_pic":"http://ww2.sinaimg.cn/thumbnail/61e86ad3jw1dwdho8goxaj.jpg"
    public string  thumbnail_pic {get;set;}
		//"bmiddle_pic":"http://ww2.sinaimg.cn/bmiddle/61e86ad3jw1dwdho8goxaj.jpg"
    public string  bmiddle_pic {get;set;}
		//"original_pic":"http://ww2.sinaimg.cn/large/61e86ad3jw1dwdho8goxaj.jpg"
    public string  original_pic {get;set;}
		//"geo":null
    public string  geo {get;set;}
		//"reposts_count":0
    public string  reposts_count {get;set;}
		//"comments_count":0
    public string  comments_count {get;set;}
		//"attitudes_count":0
    public string  attitudes_count {get;set;}
		//"mlevel":0
    public string  mlevel {get;set;}
		//"visible":{"type":0"list_id":0}
    public map<string,object>  visible {get;set;}
	}
	public class WB_users_show_out {

		//返回值字段	字段类型	字段说明    
		//id	int64	用户UID
    public string  id {get;set;}
		//screen_name	string	用户昵称
    public string  screen_name {get;set;}
		//name	string	友好显示名称
    public string  name {get;set;}
		//province	int	用户所在地区ID
    public string  province {get;set;}
		//city	int	用户所在城市ID
    public string  city {get;set;}
		//location	string	用户所在地
    public string  location {get;set;}
		//description	string	用户描述
    public string  description {get;set;}
		//url	string	用户博客地址
    public string  url {get;set;}
		//profile_image_url	string	用户头像地址
    public string  profile_image_url {get;set;}
		//domain	string	用户的个性化域名
    public string  domain {get;set;}
		//gender	string	性别，m：男、f：女、n：未知
    public string  gender {get;set;}
		//followers_count	int	粉丝数
    public string  followers_count {get;set;}
		//friends_count	int	关注数
    public string  friends_count {get;set;}
		//statuses_count	int	微博数
    public string  statuses_count {get;set;}
		//favourites_count	int	收藏数
    public string  favourites_count {get;set;}
		//created_at	string	创建时间
    public string  created_at {get;set;}
		//following	boolean	当前登录用户是否已关注该用户
    public string  following {get;set;}
		//allow_all_act_msg	boolean	是否允许所有人给我发私信
    public string  allow_all_act_msg {get;set;}
		//geo_enabled	boolean	是否允许带有地理信息
    public string  geo_enabled {get;set;}
		//verified	boolean	是否是微博认证用户，即带V用户
    public string  verified {get;set;}
		//allow_all_comment	boolean	是否允许所有人对我的微博进行评论
    public string  allow_all_comment {get;set;}
		//avatar_large	string	用户大头像地址
    public string  avatar_large {get;set;}
		//verified_reason	string	认证原因
    public string  verified_reason {get;set;}
		//follow_me	boolean	该用户是否关注当前登录用户
    public string  follow_me {get;set;}
		//online_status	int	用户的在线状态，0：不在线、1：在线
    public string  online_status {get;set;}
		//bi_followers_count	int	用户的互粉数
    public string  bi_followers_count {get;set;}
		//status	object	用户的最近一条微博信息字段
    public WB_users_show_out status {get;set;}

    public WB_users_show_out parse(string content) {
        WB_users_show_out c = (WB_users_show_out)JSON.deserialize(
        	content, WB_users_show_out.class);
        return c;
    }
	}
	//---------- /statuses/user_timeline.json ------------

	public class WB_statuses_user_timeline_in {
		//source	false	string	采用OAuth授权方式不需要此参数，其他授权方式为必填参数，数值为应用的AppKey。
		public string  source {get;set;}
		//access_token	false	string	采用OAuth授权方式为必填参数，其他授权方式不需要此参数，OAuth授权后获得。
		public string  access_token {get;set;}
		//uid	false	int64	需要查询的用户ID。
		public string  uid {get;set;}
		//screen_name	false	string	需要查询的用户昵称。
		public string  screen_name {get;set;}
		//since_id	false	int64	若指定此参数，则返回ID比since_id大的微博（即比since_id时间晚的微博），默认为0。
		public string  since_id {get;set;}
		//max_id	false	int64	若指定此参数，则返回ID小于或等于max_id的微博，默认为0。
		public string  max_id {get;set;}
		//count	false	int	单页返回的记录条数，默认为50。
		public string  count {get;set;}
		//page	false	int	返回结果的页码，默认为1。
		public string  page {get;set;}
		//base_app	false	int	是否只获取当前应用的数据。0为否（所有数据），1为是（仅当前应用），默认为0。
		public string  base_app {get;set;}
		//feature	false	int	过滤类型ID，0：全部、1：原创、2：图片、3：视频、4：音乐，默认为0。
		public string  feature {get;set;}
		//trim_user	false	int	返回值中user字段开关，0：返回完整user字段、1：user字段仅返回user_id，默认为0。
		public string  trim_user {get;set;}
		
		public WB_statuses_user_timeline_in(){
			access_token = WBUtil.token;
			trim_user='1';
		}
		
		public string toRequestUrl(){	       
    	return toRequestUrl('');
		}
		public string toRequestUrl(string since_id){
	    string url = url_statuses_user_timeline + 
		     '?access_token=' + access_token + 
				 '&trim_user=' + trim_user;
		     
			if(!WBUtil.isNvl(uid)){
				url +='&uid=' + uid;
			}
			else{
				screen_name +='&screen_name=' + screen_name;
			}
			if(!WBUtil.isNvl(since_id)){
				url +='&since_id=' + since_id;
			}	    
    	return url;
		}
	}
/*
	public class WB_statuses_user_timeline_out_user {
    //"id": 1404376560,
    public string  id {get;set;}
		//"screen_name": "zaku",
    public string  screen_name {get;set;}
		//"name": "zaku",
    public string  name {get;set;}
		//"province": "11",
    public string  province {get;set;}
		//"city": "5",
    public string  city {get;set;}
		//"location": "北京 朝阳区",
    public string  location {get;set;}
		//"description": "人生五十年，乃如梦如幻；有生斯有死，壮士复何憾。",
    public string  description {get;set;}
		//"url": "http://blog.sina.com.cn/zaku",
    public string  url {get;set;}
		//"profile_image_url": "http://tp1.sinaimg.cn/1404376560/50/0/1",
    public string  profile_image_url {get;set;}
		//"domain": "zaku",
    public string  domain {get;set;}
		//"gender": "m",
    public string  gender {get;set;}
		//"followers_count": 1204,
    public string  followers_count {get;set;}
		//"friends_count": 447,
    public string  friends_count {get;set;}
		//"statuses_count": 2908,
    public string  statuses_count {get;set;}
		//"favourites_count": 0,
    public string  favourites_count {get;set;}
		//"created_at": "Fri Aug 28 00:00:00 +0800 2009",
    public string  created_at {get;set;}
		//"following": false,
    public string  following {get;set;}
		//"allow_all_act_msg": false,
    public string  allow_all_act_msg {get;set;}
		//"remark": "",
    public string  remark {get;set;}
		//"geo_enabled": true,
    public string  geo_enabled {get;set;}
		//"verified": false,
    public string  verified {get;set;}
		//"allow_all_comment": true,
    public string  allow_all_comment {get;set;}
		//"avatar_large": "http://tp1.sinaimg.cn/1404376560/180/0/1",
    public string  avatar_large {get;set;}
		//"verified_reason": "",
    public string  verified_reason {get;set;}
		//"follow_me": false,
    public string  follow_me {get;set;}
		//"online_status": 0,
    public string  online_status {get;set;}
		//"bi_followers_count": 215
    public string  bi_followers_count {get;set;}
	}
*/
	public class WB_statuses_user_timeline_out_geo {
		//"type":"Point"
    public string type{get;set;}
		//"coordinates":[31.208545,121.528007]
    public string[] coordinates{get;set;}
	}
	
	public class WB_statuses_user_timeline_out {

		//返回值字段	字段类型	字段说明    
		//created_at	string	创建时间
    public string  created_at {get;set;}
		//id	int64	微博ID
    public string  id {get;set;}
		//mid	int64	微博MID
    public string  mid {get;set;}
		//idstr	string	字符串型的微博ID
    public string  idstr {get;set;}
		//text	string	微博信息内容
    public string  text {get;set;}
		//source	string	微博来源
    public string  source {get{return EncodingUtil.urlDecode(source,'UTF-8');}set;}
		//favorited	boolean	是否已收藏
    public boolean  favorited {get;set;}
		//truncated	boolean	是否被截断
    public boolean  truncated {get;set;}
		//in_reply_to_status_id	int64	回复ID
    public string  in_reply_to_status_id {get;set;}
		//in_reply_to_user_id	int64	回复人UID
    public string  in_reply_to_user_id {get;set;}
		//in_reply_to_screen_name	string	回复人昵称
    public string  in_reply_to_screen_name {get;set;}
		//geo	object	地理信息字段
    public WB_statuses_user_timeline_out_geo geo {get;set;}
		//uid	object	微博作者的用户信息字段
    public string  uid {get;set;}
		//reposts_count	int	转发数
    public integer  reposts_count {get;set;}
		//comments_count	int	评论数
    public integer  comments_count {get;set;}
		//"attitudes_count":0
    public integer  attitudes_count {get;set;}
		//"mlevel":0
    public integer  mlevel {get;set;}
/*
		//"visible":{"type":0,"list_id":0}}
    //public map<string,Object>  visible {get;set;}
		//bmiddle_pic	string	中等尺寸图片地址
    public string  bmiddle_pic {get;set;}
		//original_pic	string	原始图片地址
    public string  original_pic {get;set;}
		//thumbnail_pic	string	缩略图片地址
    public string  thumbnail_pic {get;set;}
		//annotations	array	微博附加注释信息
    public string  annotations {get;set;}
		//user	object	微博作者的用户信息字段
    //public WB_statuses_user_timeline_out_user  user {get;set;}
*/
	}
	public class WB_statuses_user_timeline_out_array {
    //"marks":[]
    public List<object>  marks {get;set;}
    //"hasvisible":false
    public boolean  hasvisible {get;set;}
    //"previous_cursor": 0,
    public string  previous_cursor {get;set;}
    //"next_cursor": 11488013766,
    public string  next_cursor {get;set;}
    //"total_number": 81655
    public string  total_number {get;set;}
    // "statuses": [
    public List<WB_statuses_user_timeline_out>  statuses {get;set;}
    
    public WB_statuses_user_timeline_out_array parse(string content) {
        WB_statuses_user_timeline_out_array c = (WB_statuses_user_timeline_out_array)JSON.deserialize(
        	content, WB_statuses_user_timeline_out_array.class);
        return c;
    }
	}
	
}